package com.mybrothers.dao.impl;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mybrothers.dao.UserInfoMapper;
import com.mybrothers.po.UserInfo;

//@Service("UserInfoMapperImpl") 
@Repository("userInfoMapper")
public class UserInfoMapperImpl implements UserInfoMapper{
	
	@Autowired
	SqlSessionFactory sqlSessionFactory;

	public int insert(UserInfo record) {
		return 0;
	}

	public int insertSelective(UserInfo record) {
		return 0;
	}
	
	public UserInfo selcetUserInfoByPrimaryId(int id){
		SqlSession sqlSession = sqlSessionFactory.openSession();
		UserInfo userinfo = null;
		try {
			userinfo = sqlSession.selectOne("selectUserInfoByPrimaryId", id);
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			sqlSession.close();
		}
		
		return userinfo;
	}

}
